import type { GiteePushlogVO, GiteePushlogForm, GiteePushlogQuery } from './model';

import type { ID, IDS } from '#/api/common';
import type { PageResult } from '#/api/common';

import { commonExport } from '#/api/helper';
import { requestClient } from '#/api/request';

/**
* 查询gtiee上传日志列表
* @param params
* @returns gtiee上传日志列表
*/
export function giteePushlogList(params?: GiteePushlogQuery) {
  return requestClient.get<PageResult<GiteePushlogVO>>('/bwflwp/giteePushlog/list', { params });
}

/**
 * 导出gtiee上传日志列表
 * @param params
 * @returns gtiee上传日志列表
 */
export function giteePushlogExport(params?: GiteePushlogQuery) {
  return commonExport('/bwflwp/giteePushlog/export', params ?? {});
}

/**
 * 查询gtiee上传日志详情
 * @param id id
 * @returns gtiee上传日志详情
 */
export function giteePushlogInfo(id: ID) {
  return requestClient.get<GiteePushlogVO>(`/bwflwp/giteePushlog/${id}`);
}

/**
 * 新增gtiee上传日志
 * @param data
 * @returns void
 */
export function giteePushlogAdd(data: GiteePushlogForm) {
  return requestClient.postWithMsg<void>('/bwflwp/giteePushlog', data);
}

/**
 * 更新gtiee上传日志
 * @param data
 * @returns void
 */
export function giteePushlogUpdate(data: GiteePushlogForm) {
  return requestClient.putWithMsg<void>('/bwflwp/giteePushlog', data);
}

/**
 * 删除gtiee上传日志
 * @param id id
 * @returns void
 */
export function giteePushlogRemove(id: ID | IDS) {
  return requestClient.deleteWithMsg<void>(`/bwflwp/giteePushlog/${id}`);
}
